gridpack::math::NLSBuilder< T, I > Struct Template Reference

#include <nonlinear_solver_functions.hpp>

List of all members.

Public Types

typedef boost::function< void(const
VectorT< T, I > &x, MatrixT< T,
I > &J)> 
Jacobian
 A function object that builds the Jacobian for NonlinearSolver.
typedef boost::function< void(const
VectorT< T, I > &x, VectorT< T,
I > &F)> 
Function
 A function object that builds the RHS for NonlinearSolver.

template<typename T, typename I = int>
struct gridpack::math::NLSBuilder< T, I >


Member Typedef Documentation

template<typename T, typename I = int>
typedef boost::function<void (const VectorT<T, I>& x, VectorT<T, I>& F)> gridpack::math::NLSBuilder< T, I >::Function

A function object that builds the RHS for NonlinearSolver.

This type is used to supply a way to build a right hand side Vector to NonlinearSolver instances. The NonlinearSolver will use this each iteration to construct the Vector F from the current solution estimate in x. A FunctionBuilder may be a function or function object. For example, this

 {.cpp}
   void 
   my_function_builder(const Vector& x, Vector& F)
   {
   // ...      
   F.ready();
   }
   JacobianBuilder j = my_function_builder;

and

 {.cpp}
   struct my_function_builder_type {
   void operator()(const Vector& x, Vector& F)
   {
   // ...
   F.ready();
   }
   }; 
   my_function_builder_type my_function_builder;
   JacobianBuilder j = boost::ref(my_function_builder);

are equivalent. The latter is usually more convenient because necessary information can be included in the function object.

template<typename T, typename I = int>
typedef boost::function<void (const VectorT<T, I>& x, MatrixT<T, I>& J)> gridpack::math::NLSBuilder< T, I >::Jacobian

A function object that builds the Jacobian for NonlinearSolver.

This type is used to supply a way to build a Jacobian Matrix to NonlinearSolver instances. The NonlinearSolver will use this each iteration to construct the Matrix J from the current solution estimate in x. A Jacobian builder may be a function or function object. For example, this

 {.cpp}
   void 
   my_jacobian_builder(const Vector& x, Matrix& J)
   {
   // ...
   J.ready();
   }
   JacobianBuilder j = my_jacobian_builder;

and

 {.cpp}
   struct my_jacobian_builder_type {
   void operator()(const Vector& x, Matrix& J)
   {
   // ...
   J.ready();
   }
   } 
   my_jacobian_builder_type my_jacobian_builder;
   JacobianBuilder j = my_jacobian_builder;

are equivalent. The latter is usually more convenient because necessary information can be included in the function object.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 3 Feb 2020 for GridPACK by  doxygen 1.6.1